package com.nested;

public class MemberInner {

    //成员内部类

    private String name="小米";

    class Member{

      //  private String name;

        public void method(){

            System.out.println("内部");
        }

        public String method3(){

            System.out.println("内部独有");

            System.out.println(name);
            method1();
            return "j";
        }

        public void method4(){

            System.out.println("内部method4");
           MemberInner mejj = new MemberInner();
           mejj.method();
        }
    }

    public void method(){

     //   System.out.println(new Member().method3());
        System.out.println("外部");
    }

    public void method1(){

        System.out.println("外部方法");
        System.out.println(new Member().method3());
        new Member().method4();
    }



    public static void main(String[] args) {



        MemberInner.Member me = new  MemberInner().new Member();
       me.method4();


//       MemberInner memberInner = new MemberInner();
//       memberInner.new Member().method3();



    }

}
